package com.gongj.initializing;

import org.springframework.beans.factory.InitializingBean;

import javax.annotation.PreDestroy;

public class A implements InitializingBean{

	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void initMethod(){
		System.out.println("初始化方法执行");
		this.name = "yuanj";
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("afterPropertiesSet 初始化方法执行");
		this.name = "gongj";
		int i = 5/0;
	}
}
